package cn.thoughtworks.school.usercenter.services;

import cn.thoughtworks.school.usercenter.feign.ProgramCenterFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;
import java.util.Map;

@Service
public class ProgramService {
    @Autowired
    private ProgramCenterFeign programCenterFeign;

    public void joinProgram(String type, String programId,Long userId) {
        Map data = new HashMap();
        data.put("programId", programId);
        data.put("tutorId", userId);
        data.put("userId", userId);
        programCenterFeign.joinProgram(Long.parseLong(programId), type, userId, data);
    }
}
